Most of the time, while working with Python interactive shell/terminal (not a console), we end up with a messy output and want to clear the screen for some reason. In an interactive shell/terminal, we can simply use...
Given an integer ‘n’, write a Python function that returns true if binary representation of x is palindrome else return false. Examples:...
Given an unsorted array and a number n, find if there exists a pair of elements in the array whose difference is n. Examples:...
Sometimes, while working with Numbers in Python, we can have a problem in which we need to get the number of time one number follows other. This can have application in many domains such as day-day programming and other domains. Let us discuss certain ways in which this task can be performed....
Sometimes, we might have a problem in which we require to get the maximum difference of 2 numbers from list but with a constraint of having the numbers in successions. This type of problem can occur while competitive programming. Let’s discuss certain ways in which this problem can be solved....
Sometimes, while working with records, we might have a common problem of maximizing contents of one tuple with corresponding index of other tuple. This has application in almost all the domains in which we work with tuple records. Let’s discuss certain ways in which this task can be performed....
Sometimes, while working with records, we can have a problem in which we need to the maximum all the columns of a container of lists that are tuples. This kind of application is common in the web development domain. Let’s discuss certain ways in which this task can be performed....
While working with dictionary, we might come to a problem in which we require to ensure that all the values are atleast K in dictionary. This kind of problem can occur while checking status of start or checking for a bug/action that could have occurred. Let’s discuss certain ways in which this task can be performed....
Sometimes, while working with tuple list, we may require a case in which we require that a tuple starts from the end of previous tuple, i.e the element 0 of every tuple should be equal to ending element of tuple in list of tuple. This type of problem and sorting is useful in competitive programming. Let’s discuss way in which this problem can be solved....
Given a file, the task is to change the content in reverse order using Stack, as well as store the lines of that file in reverse order in Python....
Given a complete binary tree, traverse it such that all the boundary nodes are visited in Anti-Clockwise order starting from the root....
Given a Negative Integer, the task is to write a Python program to convert the integer into binary format....